import request from '@/utils/request'
// 获取角色列表
// get 请求参数需要params
export const getRoleList = params => request.get('/sys/role', { params })
// 获取公司信息
export const getCompanyInfo = companyId => request.get(`/company/${companyId}`)
// 删除角色
export const deleteRole = id => request.delete(`/sys/role/${id}`)
// 修改角色
export const updateRole = data => request.put(`/sys/role/${data.id}`, data)
// 获取角色详情
export const getRoleDetail = id => request.get(`/sys/role/${id}`)
// 新增角色
// export const addRole = data => request.post(`/sys/role`, data)
export function addRole(data) {
  return request({
    url: '/sys/role',
    data,
    method: 'post'
  })
}
